lsync - Realtime mirroring
2011/04/10 |
Install Lsync that is a flexible cross-platform synchronization tool. rsync is also required, so in addition to the setting of rsync, Configure lsyncd. |
|
[1] | Install lsyncd in Source Host |
[root@www ~]# yum --enablerepo=rpmforge -y install lsyncd # install from RPMforge [root@www ~]# cp /usr/share/doc/lsyncd/lrsync.lua /etc/lsyncd.conf [root@www ~]# vi /etc/lsyncd.conf ---- -- User configuration file for lsyncd. -- -- Simple example for default rsync. -- settings = { statusFile = "/tmp/lsyncd.stat", # line 8: change statusInterval = 1,} sync{ default.rsync, # line 13: source directory source=" /var/www/html/ ",# line 14: destination Hostname or IP address:(the name set in rsyncd.conf) target=" 10.0.0.33::site ",# add: rsync's options rsyncOps="-az", # add: excluding list excludeFrom="/etc/rsync_exclude.lst", } [root@www ~]# /etc/rc.d/init.d/lsyncd start Starting lsyncd: [ OK ] [root@www ~]# chkconfig lsyncd on
|
[2] | Confirm files and directories are copied in destination Host. |